package com.train.user.service.impl;

import java.util.List;
import com.train.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.train.user.mapper.SysUserNotificationMapper;
import com.train.user.domain.SysUserNotification;
import com.train.user.service.SysUserNotificationService;

/**
 * 用户通知阅读记录Service业务层处理
 * 
 * @author train
 * @date 2025-10-25
 */
@Service
public class SysUserNotificationServiceImpl implements SysUserNotificationService
{
    @Autowired
    private SysUserNotificationMapper sysUserNotificationMapper;

    /**
     * 查询用户通知阅读记录
     * 
     * @param id 用户通知阅读记录主键
     * @return 用户通知阅读记录
     */
    @Override
    public SysUserNotification selectSysUserNotificationById(Long id)
    {
        return sysUserNotificationMapper.selectSysUserNotificationById(id);
    }

    /**
     * 查询用户通知阅读记录列表
     * 
     * @param sysUserNotification 用户通知阅读记录
     * @return 用户通知阅读记录
     */
    @Override
    public List<SysUserNotification> selectSysUserNotificationList(SysUserNotification sysUserNotification)
    {
        return sysUserNotificationMapper.selectSysUserNotificationList(sysUserNotification);
    }

    /**
     * 新增用户通知阅读记录
     * 
     * @param sysUserNotification 用户通知阅读记录
     * @return 结果
     */
    @Override
    public int insertSysUserNotification(SysUserNotification sysUserNotification)
    {
        sysUserNotification.setCreateTime(DateUtils.getNowDate());
        return sysUserNotificationMapper.insertSysUserNotification(sysUserNotification);
    }

    /**
     * 修改用户通知阅读记录
     * 
     * @param sysUserNotification 用户通知阅读记录
     * @return 结果
     */
    @Override
    public int updateSysUserNotification(SysUserNotification sysUserNotification)
    {
        return sysUserNotificationMapper.updateSysUserNotification(sysUserNotification);
    }

    /**
     * 批量删除用户通知阅读记录
     * 
     * @param ids 需要删除的用户通知阅读记录主键
     * @return 结果
     */
    @Override
    public int deleteSysUserNotificationByIds(Long[] ids)
    {
        return sysUserNotificationMapper.deleteSysUserNotificationByIds(ids);
    }

    /**
     * 删除用户通知阅读记录信息
     * 
     * @param id 用户通知阅读记录主键
     * @return 结果
     */
    @Override
    public int deleteSysUserNotificationById(Long id)
    {
        return sysUserNotificationMapper.deleteSysUserNotificationById(id);
    }
}
